package cn.wolfcode.wolf2w.util;

import cn.wolfcode.wolf2w.exception.LogicException;
import org.springframework.util.StringUtils;

public class AssertUtil {
    private  AssertUtil(){};

    public static void hasLength(String value ,String msg){
        if(!StringUtils.hasLength(value)){
            throw new LogicException(msg);
        }
    }

    public static void isEquals(String password, String rpassword,String msg) {
        if(!password.equals(rpassword)){
            throw new LogicException(msg);
        }
    }
}
